package com.lvmama.rhino.pojo;

import java.util.Date;

import org.springframework.data.elasticsearch.annotations.Document;  
import org.springframework.data.elasticsearch.annotations.Field;  
import org.springframework.data.elasticsearch.annotations.FieldIndex;  
import org.springframework.data.elasticsearch.annotations.FieldType;  
  
import com.lvmama.rhino.utils.Constants;  
  
//@Document(indexName = APP.ESProp.INDEX_NAME, type = APP.ESProp.TYPE_TASK_INFO, indexStoreType = APP.ESProp.INDEX_STORE_TYPE, shards = APP.ESProp.SHARDS, replicas = APP.ESProp.REPLICAS, refreshInterval = APP.ESProp.REFRESH_INTERVAL)  
@Document(indexName = Constants.H5Page_INDEX_NAME, type = Constants.H5Page_TYPE_NAME_ALL) 
public class PageMonitorInfo {
    /**
     * 省份
     */
    //indexAnalyzer="ik", searchAnalyzer="ik"
    @Field(type = FieldType.String, index = FieldIndex.not_analyzed, store = true)  
    private String province;  
  
    /**
     * 城市
     */
    @Field(type = FieldType.String, index = FieldIndex.not_analyzed, store = true)  
    private String city;  
  
    /**
     * 运营商
     */
    @Field(type = FieldType.String, index = FieldIndex.not_analyzed, store = true)  
    private String operators;  
      
    /**
     * 品类
     */
    @Field(type = FieldType.String, index = FieldIndex.not_analyzed, store = true)  
    private String category_id;  
    
    /**
     * 网络制式,2g,3g,4g,wifi,none
     */
    @Field(type = FieldType.String, index = FieldIndex.not_analyzed, store = true)  
    private String network_type;  
  
    /**
     * 页面加载时长
     */
    @Field(type = FieldType.Double, store = true)  
    private Double load_time;  
  
    /**
     * 页面总加载时长
     */
    @Field(type = FieldType.Double, store = true)  
    private Double total_load_time;  
    
    /**
     * 0-H5,1-NATIVE
     */
    @Field(type = FieldType.String, index = FieldIndex.not_analyzed, store = true)  
    private String is_lv;
    
    /**
     * 创建时间
     */
    @Field(type = FieldType.Date, store = true)  
    private Date create_date;
    
    /**
     * 访问次数
     */
    @Field(type = FieldType.Long, store = true)  
    private Long visit_times;
    
    /**
     * 占比
     */
    @Field(type = FieldType.String, index = FieldIndex.not_analyzed, store = true)  
    private String proportion;
    
    /**
     * 平均加载时长
     */
    @Field(type = FieldType.Double, store = true)  
    private Double average_time;
    
    /**
     * 平均时间
     */
    @Field(type = FieldType.String, index = FieldIndex.not_analyzed, store = true)  
    private String average_time_str;
    
    /**
     * 页面的pageCode
     */
    @Field(type = FieldType.String, index = FieldIndex.not_analyzed, store = true)  
    private String page_code;
    
    /**
     * 页面的url
     */
    @Field(type = FieldType.String, index = FieldIndex.not_analyzed, store = true)  
    private String url;
    
    /**
     * 日期
     */
    @Field(type = FieldType.Date, store = true)  
    private Date date;
      
    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getOperators() {
        return operators;
    }

    public void setOperators(String operators) {
        this.operators = operators;
    }

    public String getCategory_id() {
        return category_id;
    }

    public void setCategory_id(String category_id) {
        this.category_id = category_id;
    }

    public String getNetwork_type() {
        return network_type;
    }

    public void setNetwork_type(String network_type) {
        this.network_type = network_type;
    }

    public Double getLoad_time() {
        return load_time;
    }

    public void setLoad_time(Double load_time) {
        this.load_time = load_time;
    }

    public Double getTotal_load_time() {
        return total_load_time;
    }

    public void setTotal_load_time(Double total_load_time) {
        this.total_load_time = total_load_time;
    }

    public String getIs_lv() {
        return is_lv;
    }

    public void setIs_lv(String is_lv) {
        this.is_lv = is_lv;
    }

    public Date getCreate_date() {
        return create_date;
    }

    public void setCreate_date(Date create_date) {
        this.create_date = create_date;
    }

    public Long getVisit_times() {
        return visit_times;
    }

    public void setVisit_times(Long visit_times) {
        this.visit_times = visit_times;
    }

    public String getProportion() {
        return proportion;
    }

    public void setProportion(String proportion) {
        this.proportion = proportion;
    }

    public Double getAverage_time() {
        return average_time;
    }

    public void setAverage_time(Double average_time) {
        this.average_time = average_time;
    }

    public String getAverage_time_str() {
        return average_time_str;
    }

    public void setAverage_time_str(String average_time_str) {
        this.average_time_str = average_time_str;
    }

    public String getPage_code() {
        return page_code;
    }

    public void setPage_code(String page_code) {
        this.page_code = page_code;
    }
    
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    @Override  
    public String toString() {  
        return "TaskInfo [province=" + province  
                + ", city=" + city + ", operators=" + operators  
                + ", category_id=" + category_id + ", network_type=" + network_type  
                + ", load_time=" + load_time + ", total_load_time="  
                + total_load_time + ", is_lv=" + is_lv  
                + ", create_date=" + create_date + ", visit_times=" + visit_times  
                + ", proportion=" + proportion + ", average_time=" + average_time  
                + ", average_time_str=" + average_time_str + ", page_code="  
                + page_code + ", url=" + url + ", date=" + date + "]";  
    }  
  
    public PageMonitorInfo(String province, String city,  
            String operators, String category_id, String network_type,  
            Double load_time, Double total_load_time, String is_lv,
            Date create_date, Long visit_times, String proportion,
            Double average_time, String average_time_str,String page_code,
            String url,Date date) {  
        this.province = province;  
        this.city = city;  
        this.operators = operators;  
        this.category_id = category_id;  
        this.network_type = network_type;  
        this.load_time = load_time;  
        this.total_load_time = total_load_time; 
        this.is_lv = is_lv;  
        this.create_date = create_date;  
        this.visit_times = visit_times;  
        this.proportion = proportion;  
        this.average_time = average_time;  
        this.average_time_str = average_time_str;  
        this.page_code = page_code;
        this.url = url;
        this.date = date;
    }  
    public PageMonitorInfo() {  
        // TODO Auto-generated constructor stub  
    } 
}
